/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication6.ControlLayer;

import java.util.ArrayList;
import java.util.HashMap;
import javaapplication6.DomainLayer.StatisticsLogOrders;
import javaapplication6.DomainLayer.OrderRentProduct;
import javaapplication6.DomainLayer.OrderSellProduct;

/**
 *
 * @author meydlo
 */
public class StatisticsControl {

    private StatisticsLogOrders logOrders;
    private OrderRentControl orderRentControl;
    private OrderSellControl orderSellControl;

    public StatisticsControl()
    {
        logOrders=StatisticsLogOrders.getLogOrders();
        orderRentControl=new OrderRentControl();
        orderSellControl=new OrderSellControl();

    }


    public void getAllOrders(){
        System.out.println(logOrders.getLogOrdersSellHashMap());
    }

    public void printRentOrdered(boolean isDetailed)
    {
        HashMap<Long,ArrayList<OrderRentProduct>> logOrdersRentHashMap=logOrders.getLogOrdersRentHashMap();
        orderRentControl.printOrdersHashMap(logOrdersRentHashMap, isDetailed);
    }

    public void printSellOrdered(boolean isDetailed)
    {
        HashMap<Long,ArrayList<OrderSellProduct>> logOrdersSellHashMap=logOrders.getLogOrdersSellHashMap();
        orderSellControl.printOrdersHashMap(logOrdersSellHashMap, isDetailed);
    }
}
